#include "include/mainwindow.h"

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent){


    QMenu * menu = new QMenu("View");

    QAction * action = new QAction("ToolBox", (this));
    connect(action, SIGNAL(triggered()), this, SLOT(ShowCurrentToolBox()));

    menu->addAction(action);
    menuBar()->addMenu(menu);
    Canvas *  canvas    =   new Canvas(50.0f, 50.0f,this);



    m_CurrentCanvas=canvas;
    canvas->Pixel(25,25,QColor(255,0,0,255));
    this->setCentralWidget(canvas);
}

MainWindow::~MainWindow()
{
}


void MainWindow::ShowCurrentToolBox(){
    m_ToolBox   =   &m_CurrentCanvas->GetToolBoxView();
    m_ToolBox->show();
}
